package net.zoneland.knowledge.dao;

import java.util.List;
import net.zoneland.knowledge.model.RobotInfo;
import net.zoneland.knowledge.model.RobotInfoExample;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
@Mapper
public interface RobotInfoMapper {
    @SelectProvider(type=RobotInfoSqlProvider.class, method="countByExample")
    long countByExample(RobotInfoExample example);

    @Insert({
        "insert into AITK_ROBOT_INFO (ID, ORDERS, ",
        "ROBOTNAME, OPENINGWORDS, ",
        "CMPDN, CMPNAME, ",
        "CREATETIME, DEPTDN, ",
        "DEPTNAME, ROBOTOPENINGWORDS)",
        "values (#{id,jdbcType=VARCHAR}, #{orders,jdbcType=VARCHAR}, ",
        "#{robotName,jdbcType=VARCHAR}, #{openingWords,jdbcType=VARCHAR}, ",
        "#{cmpDn,jdbcType=VARCHAR}, #{cmpName,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{deptDn,jdbcType=VARCHAR}, ",
        "#{deptName,jdbcType=VARCHAR}, #{robotOpeningWords,jdbcType=VARCHAR})"
    })
    int insert(RobotInfo record);

    @InsertProvider(type=RobotInfoSqlProvider.class, method="insertSelective")
    int insertSelective(RobotInfo record);

    @SelectProvider(type=RobotInfoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="ID", property="id", jdbcType=JdbcType.VARCHAR),
        @Result(column="ORDERS", property="orders", jdbcType=JdbcType.VARCHAR),
        @Result(column="ROBOTNAME", property="robotName", jdbcType=JdbcType.VARCHAR),
        @Result(column="OPENINGWORDS", property="openingWords", jdbcType=JdbcType.VARCHAR),
        @Result(column="CMPDN", property="cmpDn", jdbcType=JdbcType.VARCHAR),
        @Result(column="CMPNAME", property="cmpName", jdbcType=JdbcType.VARCHAR),
        @Result(column="CREATETIME", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="DEPTDN", property="deptDn", jdbcType=JdbcType.VARCHAR),
        @Result(column="DEPTNAME", property="deptName", jdbcType=JdbcType.VARCHAR),
        @Result(column="ROBOTOPENINGWORDS", property="robotOpeningWords", jdbcType=JdbcType.VARCHAR)
    })
    List<RobotInfo> selectByExample(RobotInfoExample example);

    @UpdateProvider(type=RobotInfoSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") RobotInfo record, @Param("example") RobotInfoExample example);

    @UpdateProvider(type=RobotInfoSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") RobotInfo record, @Param("example") RobotInfoExample example);
}